﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MGU_v1_Lab1
{
    public class Person
    {
        private string name;
        private string surename;
        private DateTime birthday;
        public Person(string name, string surename, DateTime birthday)
        {
            this.name = name;
            this.surename = surename;
            this.birthday = birthday;
        }
        public Person()
        {
            name = "Ivan";
            surename = "Ivanov";
            birthday = Convert.ToDateTime("2000\0\0");
        }
        public string Name
        {
            get { return name; }
        }
        public string Surename
        {
            get { return surename; }
        }
        public DateTime Birthday
        {
            get { return birthday; }
        }
        public int YearOfBirth { get { return Birthday.Year; } set { Birthday.AddYears(value); } }
        public override string ToString()
        {
            return "Name: " + name + ". Surename: " + surename + ". Date Of Birth: " + Birthday.ToString();
        }
        public virtual string ToShortSteing()
        {
            return "Name: " + name + ". Surename: " + surename;
        }
    }
}
